// 入口文件
import Vue from 'vue'
//导入vue-resource
import VueResource from 'vue-resource'
//安装vue-resource
Vue.use(VueResource)
//设置请求的根路径
//Vue.http.options.root = 'http://www.vue.studyit.io'
//导入路由包
import VueRouter from 'vue-router'
//安装路由
Vue.use(VueRouter)
//导入自己的路由模块
import router from './router.js'
import moment from 'moment'
//设置全局过过滤器
Vue.filter('dateFormat',function(dateStr,pattern = "YYYY-MM-DD HH:MM"){
	return moment(dateStr).format(pattern)
})

import app from './App.vue'
import './lib/mui/css/mui.min.css'
import './lib/mui/css/icons-extra.css'
//按需导入
import { Header,Swipe,SwipeItem,Button } from 'mint-ui'
//按需导入组件
Vue.component(Header.name,Header)
Vue.component(Swipe.name,Swipe)
Vue.component(SwipeItem.name,SwipeItem)
Vue.component(Button.name,Button)


var vm = new Vue({
	el:'#app',
	render:c => c(app),
	//挂在路由到vm实例上
	router
})
